package com.example.dangerouscargodriver.entry;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CityInfo implements Serializable {
    private String id;

    private String name;

    private CityExtraInfo extra;

    private List<DistrictInfo> district = new ArrayList<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CityExtraInfo getExtra() {
        return extra;
    }

    public void setExtra(CityExtraInfo extra) {
        this.extra = extra;
    }

    public List<DistrictInfo> getDistrict() {
        return district;
    }

    public void setDistrict(List<DistrictInfo> district) {
        this.district = district;
    }

    public void addDistrict(DistrictInfo district){
        this.district.add(district);
    }

    @Override
    public String toString() {
        return "CityInfo{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", extra=" + extra +
                '}';
    }
}
